//
// Created by Tony on 2024/5/24.
//

#ifndef PARSER_TYPE_TAG_H
#define PARSER_TYPE_TAG_H

#include "../AstList.h"
#include "../leaf/Name.h"

namespace Parser {

class TypeTag final : public AstList {
    string nodeName;

public:
    explicit TypeTag(const vector<shared_ptr<Ast>>& children) : AstList(children) {
        nodeName = __func__;
    }

    shared_ptr<Name> tag() { return static_pointer_cast<Name>(children[0]); }

    int32_t accept(Compiler::Visitor* visitor) override;
};

} // namespace Parser

#endif // PARSER_TYPE_TAG_H
